/** 
 *  @file       main.c
 *  @brief      lcd1602显示ds1302时钟
 *  @author     Z B T  
 *  @version    
 *  @date       2015-10 
 */
 
/* Includes ------------------------------------------------------------------*/
//#include "led.h" 
//#include "key.h"
//#include "digitron.h"
//#include "encoder.h"
//#include "keypad.h"
//#include "clock.h"
//#include "ds1302.h"
//#include "lcd1602.h"
//#include "ds18b20.h"
//#include "lcd_display.h"
#include "TFT_LCD.h"
//#include "delay.h"
#include "config.h"

/* Private typedef -----------------------------------------------------------*/

/* Private define ------------------------------------------------------------*/

/* Private macro -------------------------------------------------------------*/

/* Private variables ---------------------------------------------------------*/

/* Private function prototypes ------------------------------------------------*/

/* Private functions ---------------------------------------------------------*/
void main(void)
{
    /* USER CODE BEGIN 1 */

    /* USER CODE END 1 */
    
    /** configuration or init */
    /* USER CODE BEGIN 2 */
    TFT_config(BLACK);
    /* USER CODE END 2 */
    
    while(1)
    {   
        /* USER CODE BEGIN 3 */
        TFT_draw_line(0, 1, 240, 1, BLUE);              /**< 本屏幕四周最大显示边界 */
        TFT_draw_line(0, 398, 240, 398, BLUE);
        TFT_draw_line(1, 0, 1, 400, BLUE);
        TFT_draw_line(238, 0, 238, 400, BLUE);
        TFT_write_char_32x33_CHN(0, 10,"南", CYAN, BLUE);                    /**< 暂时不可用 原因未知 */
        TFT_write_char_24x19_CHN(0, 10, "年月日星期摄氏度", CYAN, BLUE);    /**< 暂时不可用 原因未知 */
        TFT_write_16x24_ASCII(36, 60, "2016-02-04", MAGENTA, BLACK);
        TFT_draw_line(32, 92, 196, 92, CYAN);
        TFT_write_16x24_ASCII(36, 96, "Time:10:06", MAGENTA, BLACK);
        TFT_show_picture(TFT_XMAX - 160, TFT_YMAX - 60, 120, 67);
        
        /* USER CODE BEGIN 3 */
    }
}
